package jtk.project4.fleet.field;

/*
* Author : Rio Dermawan 
* Date Created : 1-April-2011
* Date Modified : 6-April-2011
* Version : 1.1
* */

import java.awt.Dimension;
import java.sql.Time;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.CalendarControl;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.SpinnerField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.RadioButton;

public class CheckInEquipmentField extends GroupControl {
	private RadioButton CheckInField;
	private CalendarControl DateField;
	private SpinnerField<Time> TimeField;
	private TextField MileageField;
	
	public CheckInEquipmentField(String bindID){
		setTitle("header.CheckInEquipment"); //disesuaikan dengan nama field
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields()
	{
		Dimension dimension = new Dimension(166, 20);
		CheckInField = new RadioButton("CheckInField");
		
		DateField = new CalendarControl("DateField", 20);
		DateField.setPreferredSize(dimension);
		
		TimeField = new SpinnerField<Time>(NORTH, SOUTH);
		TimeField.setPreferredSize(dimension);
		
		MileageField = new TextField("MileageField", 20);
		
	}
	
	
	private void createLayout()
	{
		setLayout(new FormLayout())

		.addLabel("label.Check In")		 .addField(CheckInField)
		.addRow()
		.addLabel("label.Date :")		 .addField(DateField)
		.addRow()
		.addLabel("label.Time :")		 .addField(TimeField)
		.addRow()
		.addLabel("label.Mileage :")	 .addField(MileageField);

	
	}
}
